package com.buka.exception;

import com.buka.common.BizCodeEnum;

public class BizException extends RuntimeException{

    private int code;
    private String msg;

    public BizException(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public BizException(BizCodeEnum bizCodeEnum){
        this.code = bizCodeEnum.getCode();
        this.msg = bizCodeEnum.getMessage();
    }
}
